package com.zmn.plat.common.dictionary;

/**
 * 标准文库阅读权限部门APP枚举
 *
 * @author linfeng
 * @since 2020/04/28 14:56:30
 */
public enum StandardPermissionAppOrganEnum {

    /**
     * values
     */
    YEYXAPP(901, "言而有信APP"),
    ZMNAPP(902, "啄木鸟APP"),
    YBWXAPP(903, "一步维修APP"),
    CNHBAPP(904, "川南环保APP"),
    ;

    private Integer code;
    private String name;

    StandardPermissionAppOrganEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static StandardPermissionAppOrganEnum of(Integer code) {
        if (code == null || code == 0) {
            return YEYXAPP;
        }
        switch (code) {
            case 901:
                return YEYXAPP;
            case 902:
                return ZMNAPP;
            case 903:
                return YBWXAPP;
            case 904:
                return CNHBAPP;
            default:
                return YEYXAPP;
        }
    }
}
